<?php

require_once __DIR__ . '/public_config.php';

class Db{
    //workerman 官方文档里推荐的orm
    private static  $_instance;
    public static function getInstance() {
        if (!isset(self::$_instance)) {
            self::$_instance = new Workerman\MySQL\Connection(MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PWD, MYSQL_NAME);
        }
        return self::$_instance;
    }
}